package org.concepts.java.core.concurrency.executor;



/**
 * Takes an array of integers and sorts them.
 * 
 * @author vvvv
 * 
 */
public interface Sorter {

  /**
   * Sorts the input.
   * <p/>
   * <b style="color:red">NOTE:</b> The sorter can decide to directly sort the
   * passed in input, if the algorithm does not need to create a new array. The
   * only modification to the passed in input is sorting. The algorithm should
   * not modify (add/delete) the array in any other way once it finishes
   * executing.
   * 
   * @param input
   *          Input. Can be null or empty
   * @return Sorted input. Is empty or null if user passes in the same.
   */
  public int[] sort(int[] input);

}
